#!/bin/bash

d=pwd
cd bin

if ps ax | grep -v grep | grep rmiregistry > /dev/null
then
echo "rmiregistry is already running"
else
rmiregistry &
fi

java -Djava.rmi.server.codebase=file://$d/bin/ repository.RunRepository
echo "Finished"
